<%--
  Created by IntelliJ IDEA.
  User: 28463
  Date: 2022/6/19
  Time: 0:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8"  %>
<%@ page import="static java.lang.Integer.*" %>

<html>
<head>
  <title>Title</title>
</head>
<body>
<%--获取session对象和number--%>
<%
  int  count =(int) session.getAttribute("count");
  int num   = parseInt(request.getParameter("number"));
%>
<%--判断大小--%>

<%--当num<count时--%>
<%
  if (num<count)
  {
    out.println("<h1>数字小了<h1>");
    response.setHeader("Refresh","3;URL=input.jsp");
  }
%>

<%--当num>count时--%>
<%
  if (num>count)
  {
    out.println("<h1>数字大了<h1>");
    response.setHeader("Refresh","3;URL=input.jsp");
  }
%>

<%--当num=count时--%>
<%
  if (num==count)
  {
    out.println("<h1>恭喜，猜对了<h1>");
  }
%>
</body>
</html>